﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class my_ascx_pdata : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ctpDataContext db = new ctpDataContext();
        int userno = int.Parse(Request["no"]);

        var data = from p in db.users
                   where p.no == userno
                   select p;

        user myuser = data.First();

        this.Label1.Text = myuser.nickname.Trim();


        if (myuser.profile_picture != null)
        {
            this.Image1.ImageUrl = "/user_imgs/2/" + myuser.profile_picture.Trim();
        }

        if (myuser.intro != null)
        {
            this.Label3.Text = myuser.intro.Trim();
        }
        else
            this.Label3.Text = "";
    }
}
